package com.mnsq.im.suchedule;

import com.mnsq.im.bean.SocketsInfoHolder;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 *
 * @author Administrator
 * @date 2019/4/27 0027
 */
@EnableScheduling
@Component
public class TimeTask {

    /**
     * 定时检查通道是否有效
     */
    @Scheduled(cron = "0/15 * * * * ?")
    public void checkChannel() {
        SocketsInfoHolder.checkSocketValid();
    }
}
